package pack0705;

//演示字符串的比较
public class DemoA {
    public static void main(String[] args) {
        String s="abc";
        String s1="abc";
        String s2=new String("abc");

        System.out.println(s==s1);
        System.out.println(s==s2); //内存地址不一致
        System.out.println(s.equals(s2));  //比较内容
    }
}
